<div class="layuimini-container">
    <div class="" id="stepForm" lay-filter="stepForm" style="margin: 0 auto">
        <div carousel-item>

            <!-- 基础信息 -->
            <div class="layuimini-container base step">
            <form id="app-form" class="layui-form layuimini-form">
                    
          
                <div class="layui-form-item">
                    <label class="layui-form-label">商品分类</label>
                    <div class="layui-input-block">
                        <input type="text"  class="layui-input" disabled  value="{$cate.cate_name}">
                        <input type="hidden" name="cate_id" class="layui-input"   value="{$cate.cate_id}">
                    </div>
                </div>
           
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="products_title" class="layui-input" lay-verify="required" placeholder="请输入商品标题" value="{$row.products_title|default=''}">
                        </div>
                    </div>
         
                    <div class="layui-form-item">
                        <label class="layui-form-label ">缩略图</label>
                        <div class="layui-input-block layuimini-upload">
                            <input name="cover_picture" class="layui-input layui-col-xs6"  placeholder="请上传缩略图" value="{$row.cover_picture|default=''}">
                            <div class="layuimini-upload-btn">
                                <span><a class="layui-btn layui-btn-sm" data-upload="cover_picture" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                                <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_cover_picture" data-upload-select="cover_picture" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label ">商品主图</label>
                        <div class="layui-input-block layuimini-upload">
                            <input name="main_picture" class="layui-input layui-col-xs6" placeholder="请上传商品主图"  id="picture-main_picture" value="{$row.main_picture|default=''}">
                            <div class="layuimini-upload-btn">
                                <span><a class="layui-btn layui-btn-sm" data-upload="main_picture" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                                <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_main_picture" data-upload-select="main_picture" data-upload-number="more" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label ">商品详情图</label>
                        <div class="layui-input-block layuimini-upload">
                            <input name="detail_picture" class="layui-input layui-col-xs6"  placeholder="请上传商品详情图" id="picture-detail_picture" value="{$row.detail_picture|default=''}">
                            <div class="layuimini-upload-btn">
                                <span><a class="layui-btn layui-btn-sm" data-upload="detail_picture" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                                <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_detail_picture" data-upload-select="detail_picture" data-upload-number="more" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label ">商品视频</label>
                        <div class="layui-input-block layuimini-upload">
                            <input name="videoUrl" class="layui-input layui-col-xs6"  placeholder="请上传商品视频" value="{$row.videoUrl|default=''}">
                            <div class="layuimini-upload-btn">
                                <span><a class="layui-btn layui-btn-sm" data-upload="videoUrl" data-upload-number="one" data-upload-exts="AVI|mov|FLV|mp4|3GP" data-upload-icon="video" ><i class="fa fa-upload"></i> 上传</a></span>
                                <!-- <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_images" data-upload-select="images" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span> -->
                            </div>
                        </div>
                    </div>
         
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-block">
                            <input type="number" name="sort" class="layui-input" placeholder="请输入排序" value="{$row.sort|default=''}">
                        </div>
                    </div>
                    <div class="layui-form-item text-center">
                        <div class="layui-input-block right">
                            <div class="layui-btn  layui-btn-normal next layui-btn-sm" lay-filter="formStep">
                                &emsp;下一步&emsp;
                            </div>
                        </div>
                    </div>
            </form>

            </div>

                <!-- 规格 -->
                <div class="layuimini-container spec step hide">
            <form class="layui-form layuimini-form">
                   
                    <div class="layui-form-item">
                        <label class="layui-form-label">类型</label>
                        <div class="layui-input-block">
                            {if $row.spec_type=='one'}
                                <input type="radio"lay-filter="spec_type" name="spec_type" value="one" title="单规格" checked>
                                <input type="radio" lay-filter="spec_type" name="spec_type" value="more" title="多规格" disabled>
                            {else/}
                                <input type="radio" lay-filter="spec_type" name="spec_type" value="one" title="单规格"  disabled>
                                <input type="radio" lay-filter="spec_type" name="spec_type" value="more" title="多规格" checked>
                            {/if}
                            
                        </div>
                     </div>
                    
                     <div class="layui-form-item one hide">
                       
                        <div class="layui-form-item">
                            <label class="layui-form-label">原价</label>
                            <div class="layui-input-inline">
                                <input type="number" name="price[]" class="layui-input" lay-verify="required" placeholder="请输入原价" value="{$row.price|default=0}">
                            </div>
                            
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">活动价</label>
                            <div class="layui-input-inline">
                                <input type="number" name="activity_price[]" class="layui-input" lay-verify="required" placeholder="请输入活动价" value="{$row.activity_price|default=0}">
                            </div>
                            
                        </div>
                         <div class="layui-form-item">
                            <label class="layui-form-label">库存</label>
                            <div class="layui-input-inline">
                                <input type="number" name="stock" class="layui-input" lay-verify="required" placeholder="请输入库存" value="{$row.stock}">
                            </div>
                            
                        </div>
                       
                    </div>
                    
                    <div class="more hide">
                        {include file="../app/admin/view/shop/goods/spec_edit.html" /}
                    </div>

                 <div class="layui-form-item text-center">
                        <div class="layui-input-block right">
                             <div class="layui-btn  layui-btn-primary pre layui-btn-sm" lay-filter="formStep">
                                &emsp;上一步&emsp;
                            </div>
                            <div class="layui-btn  layui-btn-normal next layui-btn-sm" lay-filter="formStep">
                                &emsp;下一步&emsp;
                            </div>
                        </div>
                    </div>
            </form>
            </div>

                <!-- 详情 -->
                <div class="layuimini-container info step hide">
            <form class="layui-form layuimini-form">
            
                <div class="layui-form-item">
                    <label class="layui-form-label">商品状态</label>
                    <div class="layui-input-block">
                        <input type="radio" name="is_shelves" value="1" title="上架" {if condition="$row.is_shelves==1"}checked{/if}>
                        <input type="radio" name="is_shelves" value="0" title="下架" {if condition="$row.is_shelves==0"}checked{/if}>
                    </div>
                </div>
           
                <div class="layui-form-item">
                    <label class="layui-form-label">是否热销</label>
                    <div class="layui-input-block">
                        <input type="radio" name="is_hot" value="1" title="是" {if condition="$row.is_hot==1"}checked{/if}>
                        <input type="radio" name="is_hot" value="0" title="否" {if condition="$row.is_hot==0"}checked{/if}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">是否推荐</label>
                    <div class="layui-input-block">
                        <input type="radio" name="is_recommend" value="1" title="是" {if condition="$row.is_recommend==1"}checked{/if}>
                        <input type="radio" name="is_recommend" value="0" title="否" {if condition="$row.is_recommend==0"}checked{/if}>
                    </div>
                </div>
            <div class="layui-form-item">
                        <label class="layui-form-label">单位</label>
                        <div class="layui-input-inline">
                            <input type="text" name="unit" class="layui-input" lay-verify="required" placeholder="请输入单位" value="{$row.unit}">
                        </div>
                    </div>
                <input type="hidden" name="products_id" value="{$row.products_id}">
                    <div class="hr-line"></div>
                    
               <div class="layui-form-item text-center right">
                         <div class="layui-btn  layui-btn-primary pre layui-btn-sm" lay-filter="formStep">
                            &emsp;上一步&emsp;
                        </div>
                        <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm submit" data-url="edit">提交</button>
                    </div>
            </form>
             </div>
        </div>
    </div>
</div>
<style>
 
    .pic{ border: 1px solid #e2e2e2;
        background-position: center;
        float: left;
         padding: 5px 0 5px 0;
        padding-left: 10px;
        padding-right: 10px;
        margin-left: 8px;
        margin-top: 15px;
    }
   
.laypic1{
    min-height: 36px;
    margin-top: 10px;
    margin-left: 48px;
}
</style>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="__STATIC__/admin/price-calendar/jquery-1.12.4.min.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="__STATIC__/plugs/lay-module/step-lay/step.css" media="all">
<style type="text/css">
.right {
    float: right;
}
.hide{
    display: none;
}

</style>
<script type="text/javascript">
    var $ = layui.$
    var spec_type = "{$row.spec_type}"

    $('.'+spec_type).removeClass('hide')
</script>

